//
//  ShowCell.m
//  Pacific_Computer
//
//  Created by dlios on 14-12-19.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ShowCell.h"
#import "UIColor+AddColor.h"

@implementation ShowCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.productImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.productImage];
        [_PriceLabel release];
        
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.font = [UIFont systemFontOfSize:17];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.PriceLabel = [[UILabel alloc] init];
        self.PriceLabel.font = [UIFont systemFontOfSize:13.5];
        self.PriceLabel.textColor = [UIColor redColor];
        [self.contentView addSubview:self.PriceLabel];
        [_PriceLabel release];
        
        self.SizeLabel = [[UILabel alloc] init];
        self.SizeLabel.font = [UIFont systemFontOfSize:13];
        self.SizeLabel.textColor = [UIColor shenhuiseColor];
        [self.contentView addSubview:self.SizeLabel];
        [_SizeLabel release];
        
        self.CPULabel = [[UILabel alloc] init];
        self.CPULabel.font = [UIFont systemFontOfSize:13];
        self.CPULabel.textColor = [UIColor shenhuiseColor];
        //self.CPULabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.CPULabel];
        [_CPULabel release];
        
        self.rightImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.rightImage];
        [_rightImage release];
        
        self.lineOne = [[UIView alloc] init];
        self.lineOne.backgroundColor = [UIColor huiseColor];
        [self.contentView addSubview:self.lineOne];
        [_lineOne release];
        self.lineTwo = [[UIView alloc] init];
        self.lineTwo.backgroundColor = [UIColor huiseColor];
        [self.contentView addSubview:self.lineTwo];
        [_lineTwo release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.productImage.frame = CGRectMake(self.contentView.bounds.size.width * 5.33 / 100, self.contentView.bounds.size.height * 16.66 / 100, self.contentView.bounds.size.width * 21.33 / 100, self.contentView.bounds.size.height * 66.66 / 100);
    
    self.titleLabel.frame = CGRectMake(self.contentView.bounds.size.width * 34.66 / 100, self.contentView.bounds.size.height * 16.66 / 100, self.contentView.bounds.size.width * 53.33 / 100, self.contentView.bounds.size.height * 22.22 / 100);
    
    self.PriceLabel.frame = CGRectMake(self.contentView.bounds.size.width * 34.66 / 100, self.contentView.bounds.size.height * 36.66 / 100, self.contentView.bounds.size.width * 53.33 / 100, self.contentView.bounds.size.height * 16.66 / 100);
    
    self.SizeLabel.frame = CGRectMake(self.contentView.bounds.size.width * 34.66 / 100, self.contentView.bounds.size.height * 54.44 / 100, self.contentView.bounds.size.width * 53.33 / 100, self.contentView.bounds.size.height * 15 / 100);
    
    self.CPULabel.frame = CGRectMake(self.contentView.bounds.size.width * 34.66 / 100, self.contentView.bounds.size.height * 71 / 100, self.contentView.bounds.size.width * 53.33 / 100, self.contentView.bounds.size.height * 18 / 100);
    
    self.rightImage.frame = CGRectMake(self.contentView.bounds.size.width * 92 / 100, self.contentView.bounds.size.height * 37.77 / 100, self.contentView.bounds.size.width * 5.33 / 100, self.contentView.bounds.size.height * 24.44 / 100);
    
    self.lineOne.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height * 0.555 / 100);
    self.lineTwo.frame = CGRectMake(0, self.contentView.bounds.size.height * 99.44 / 100, self.contentView.bounds.size.width, self.contentView.bounds.size.height * 0.555 / 100);
}


- (void)dealloc
{
    [_productImage release];
    [_titleLabel release];
    [_PriceLabel release];
    [_SizeLabel release];
    [_CPULabel release];
    [_rightImage release];
    [_lineOne release];
    [_lineTwo release];
    [super dealloc];
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
